package com.mercury.pattern._02_factory._factory;

import java.util.Scanner;

public class BJPizzFactory extends AbstractFactory {
    @Override
    Pizz createPizz() {
        System.out.println("输入类型：");
        Scanner scanner = new Scanner(System.in);
        String type = scanner.next();
        switch (type){
            case "1": return new BJCheesePizz("北京芝士披萨");
            case "2": return new BJPepperPizz("北京胡椒披萨");
        }
        return null;
    }
}
